﻿using System;
namespace ML.Entity
{
    /// <summary>
    /// 订单管理实体
    /// </summary>
    public class OrderEntity
    {
        /// <summary>
        /// 主键
        /// </summary>		
        public string Id { get; set; } = Guid.NewGuid().ToString("N");

        /// <summary>
        /// 用户Id
        /// </summary>		
        public string UserId { get; set; }

        /// <summary>
        /// 商户Id
        /// </summary>		
        public string MerchantId { get; set; }

        /// <summary>
        /// 总价
        /// </summary>		
        public decimal Price { get; set; }

        /// <summary>
        /// 优惠价
        /// </summary>		
        public decimal DiscountPrice { get; set; }

        /// <summary>
        /// 实际支付价
        /// </summary>		
        public decimal ActPayPrice { get; set; }

        /// <summary>
        /// 实际支付人民币
        /// </summary>		
        public decimal ActPayRMB { get; set; }

        /// <summary>
        /// 送达时间
        /// </summary>		
        public DateTime ServiceTime { get; set; }

        /// <summary>
        /// 收货地址Id
        /// </summary>		
        public string ReceivingAddressId { get; set; }

        /// <summary>
        /// 支付方式
        /// </summary>		
        public string PayMethod { get; set; } = "微信支付";

        /// <summary>
        /// 用餐人数
        /// </summary>		
        public int NumberOfMeals { get; set; }

        /// <summary>
        /// 红包类别
        /// </summary>		
        public string RedPackageType { get; set; }

        /// <summary>
        /// 订单备注
        /// </summary>		
        public string Description { get; set; }

        /// <summary>
        /// 发票信息
        /// </summary>		
        public string InvoiceInfo { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>		
        public int State { get; set; } = (int)OrderStatus.pending;

        /// <summary>
        /// 支付状态
        /// </summary>		
        public int PayState { get; set; } = (int)PayStateStatus.unpaid;

        /// <summary>
        /// 订单流水号
        /// </summary>		
        public string OrderNumber { get; set; }

        /// <summary>
        /// 删除标识
        /// </summary>		
        public int DelMark { get; set; } = (int)DeleteStatus.delete_false;

        /// <summary>
        /// 下单时间
        /// </summary>		
        public DateTime CreateTime { get; set; } = DateTime.Now;
    }
}